#ifndef  __upre_gyro_h__
#define __upre_gyro_h__

#include "UPRE_GLOBAL_DEFINE.h"
#define BUFFER_SIZE 14
static bool recv_end_flag = 0;

typedef struct Gyro
{
	uint8_t Gyro_Data[BUFFER_SIZE];
	uint8_t State;
	float Angle_pitch;		//俯仰角
	float Angle_roll;		//横滚角
	float Angle_azimuth;	//方位角
	float Delata_Angle;		//方位角变化值
	float W_x;				//惯导角速率
	float W_y;
	float W_z;
	float A_x;				//惯导加速度
	float A_y;
	float A_z;
}Gyro;

extern struct Gyro gyro;
#ifdef GYRO_GI410
static void Gyro_Start(void);
void Gyro_Reset(void);
void Gyro_Init(void);
#endif
#ifdef GYRO_MINS500
void cal_BW_MINS500(void);
void GYRO_MINS500_Init();
#endif
#ifdef GYRO_100A
#define GYRO_FACTOR       				14078.5f  //166516    2000
#define GYRO_EARTH_SPEED  				0.00000131f//0.00000052621f
#define GYRO_TIME         				0.0005f
#define GYRO_TEMPERATURE_COEFFICIENT	0.0625f
//#define GYRO_COMPENSATION               0.00000001

#define GYRO_RECIVE 1
typedef struct
{
    uint8_t gyro_buffer[8];
    uint8_t gyro_location;      //数组位置
    int gyro_original_angle;
    int gyro_original_temperature;
    float gyro_angle_s;
    float gyro_angle;               //陀螺仪偏转角
    float gyro_temperature;
    float gyro_angleDate;
    float gyro_delta_angle;
    float gyro_last_angle;
}_gyra_100A;
extern _gyra_100A gyro_100A;

void GYRO_A100_Init(void);
void get_gyroValue(void);
#endif
#endif

